package com.prs.crm.action.doc;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.courser.Util;
import org.courser.struts.BaseAction;
import org.courser.ui.PaginationSupport;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.annotation.Clew;
import com.prs.crm.context.AppContext;
import com.prs.crm.context.ToolKits;
import com.prs.crm.domain.crm.Feedback;
import com.prs.crm.domain.crm.Liaison;
import com.prs.crm.domain.doc.DeptDoc;
import com.prs.crm.domain.doc.Document;
import com.prs.crm.domain.doc.IssueAffiche;
import com.prs.crm.domain.doc.IssueApply;
import com.prs.crm.domain.doc.IssueFeedback;
import com.prs.crm.domain.doc.IssueKnowledge;
import com.prs.crm.domain.doc.IssueLeave;
import com.prs.crm.domain.doc.IssueLiaison;
import com.prs.crm.domain.doc.IssueNotice;
import com.prs.crm.domain.doc.IssuePayroll;
import com.prs.crm.domain.doc.IssueRegulation;
import com.prs.crm.domain.doc.IssueResume;
import com.prs.crm.domain.doc.IssueWorkSummary;
import com.prs.crm.domain.hr.Leave;
import com.prs.crm.domain.hr.Payroll;
import com.prs.crm.domain.hr.Resume;
import com.prs.crm.domain.oa.Affiche;
import com.prs.crm.domain.oa.Apply;
import com.prs.crm.domain.oa.Knowledge;
import com.prs.crm.domain.oa.Notice;
import com.prs.crm.domain.oa.Regulation;
import com.prs.crm.domain.oa.WorkSummary;
import com.prs.crm.report.ReportUtils;
import com.prs.crm.service.crm.FeedbackService;
import com.prs.crm.service.crm.LiaisonService;
import com.prs.crm.service.doc.DocumentService;
import com.prs.crm.service.doc.IssueAfficheService;
import com.prs.crm.service.doc.IssueApplyService;
import com.prs.crm.service.doc.IssueFeedbackService;
import com.prs.crm.service.doc.IssueKnowledgeService;
import com.prs.crm.service.doc.IssueLeaveService;
import com.prs.crm.service.doc.IssueLiaisonService;
import com.prs.crm.service.doc.IssueNoticeService;
import com.prs.crm.service.doc.IssuePayrollService;
import com.prs.crm.service.doc.IssueRegulationService;
import com.prs.crm.service.doc.IssueResumeService;
import com.prs.crm.service.doc.IssueWorkSummaryService;
import com.prs.crm.service.hr.LeaveService;
import com.prs.crm.service.hr.PayrollService;
import com.prs.crm.service.hr.ResumeService;
import com.prs.crm.service.oa.AfficheService;
import com.prs.crm.service.oa.ApplyService;
import com.prs.crm.service.oa.KnowledgeService;
import com.prs.crm.service.oa.NoticeService;
import com.prs.crm.service.oa.RegulationService;
import com.prs.crm.service.oa.WorkSummaryService;

/**
 * 内部文档Action，管理系统内部各个模块的所有文档
 * 
 * @author yl_ok
 * 
 */
public class InwardDocAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private PaginationSupport pagination;
	private Integer[] ids;
	private Document docuemnt;
	private DocumentService documentService;
	private Leave leave;
	private LeaveService leaveService;// 假条
	private Resume resume;
	private ResumeService resumeService;// 简历
	private Payroll payrollBill;
	private PayrollService payrollService;// 工资单
	private Apply apply;
	private ApplyService applyService;// 申请
	private Knowledge knowledge;
	private KnowledgeService knowledgeService;// 知识
	private Notice notice;
	private NoticeService noticeService;// 通知
	private WorkSummary workSummary;
	private WorkSummaryService workSummaryService;// 工作总结
	private Regulation regulation;
	private RegulationService regulationService;// 规章制度
	private Affiche affiche;
	private AfficheService afficheService;// 公告

	private Liaison liaison;
	private LiaisonService liaisonService;// 联络
	private Feedback feedback;
	private FeedbackService feedbackService;// 客户反馈

	private IssueLiaisonService issueLiaisonService;
	private IssueFeedbackService issueFeedbackService;

	private IssueLeaveService issueLeaveService;
	private IssueResumeService issueResumeService;
	private IssuePayrollService issuePayrollService;
	private IssueApplyService issueApplyService;
	private IssueKnowledgeService issueKnowledgeService;
	private IssueNoticeService issueNoticeService;
	private IssueWorkSummaryService issueWorkSummaryService;
	private IssueRegulationService issueRegulationService;
	private IssueAfficheService issueAfficheService;

	private IssueLiaison issueLiaison;
	private IssueFeedback issueFeedback;

	private IssueLeave issueLeave;
	private IssueResume issueResume;
	private IssuePayroll issuePayroll;
	private IssueApply issueApply;
	private IssueKnowledge issueKnowledge;
	private IssueNotice issueNotice;
	private IssueWorkSummary issueWorkSummary;
	private IssueRegulation issueRegulation;
	private IssueAffiche issueAffiche;

	private Date issueStartTime;
	private Date issueEndTime;
	private String issueDocIds;
	private String receivePersons;
	private String receivePersonNames;
	private String dept;
	private String name;
	private Collection<Leave> leaves;
	private Collection<Resume> resumes;
	private Collection<Payroll> payrolls;
	private Collection<Apply> applys;
	private Collection<Knowledge> knowledges;
	private Collection<Notice> notices;
	private Collection<WorkSummary> workSummarys;
	private Collection<Regulation> regulations;
	private Collection<Affiche> affiches;
	private Collection<Liaison> liaisons;
	private Collection<Feedback> feedbacks;
	private Collection<DeptDoc> deptDocs;

	public Collection<DeptDoc> getDeptDocs() {
		return deptDocs;
	}

	public void setDeptDocs(Collection<DeptDoc> deptDocs) {
		this.deptDocs = deptDocs;
	}

	@Action("listAllLeave")
	public String listAllLeave() {
		return SUCCESS;
	}

	@Action("listAllLeaveByDept")
	public String listAllLeaveByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Leave.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				String t = dept;
				String ydmc = dept.split(",")[0];
				if (ToolKits.isInteger(ydmc)) {
					criteria.createAlias("recorder", "re");
					criteria.add(Restrictions.eq("re.id", Integer
							.parseInt(ydmc)));
				} else if (ydmc.indexOf("dept") != -1) {
					Collection<Integer> pes = new ArrayList<Integer>();
					for (String pe : t.split(",")) {
						if (pe.indexOf("dept") == -1) {
							pes.add(Integer.parseInt(pe));
						}
					}
					if (pes.size() > 0) {
						criteria.createAlias("recorder", "re");
						criteria.add(Restrictions.in("re.id", pes));
					}
				}
			}
		}
		this.setPagination(this.getLeaveService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueLeave", results = { @Result(name = "error", type = "chain", location = "listAllLeave") })
	public String editIssueLeave() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		leaves = this.getLeaveService().getLeaveByIds(ids);
		for (Leave leave : leaves) {
			issueDocIds = (issueDocIds == null) ? leave.getId().toString()
					: issueDocIds + "," + leave.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueLeave", results = {
			@Result(name = "success", type = "redirect", location = "listAllLeave"),
			@Result(name = "error", type = "chain", location = "editIssueLeave") })
	public String submitIssueLeave() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueLeaveService().submitIssueLeave(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueLeave")
	public String listIssueLeave() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueLeave.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueLeaveService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueLeave", results = { @Result(name = "success", type = "redirect", location = "listIssueLeave") })
	public String removeIssueLeave() {
		this.getIssueLeaveService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveLeave")
	public String listReceiveLeave() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueLeave.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueLeaveService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	// /////////////////////////////////////////////////////
	@Action("listAllLiaison")
	public String listAllLiaison() {
		return SUCCESS;
	}

	@Action("listAllLiaisonByTrade")
	public String listAllLiaisonByTrade() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Liaison.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		if (name != null) {
			if (!"all".equals(name)) {
				name = ReportUtils.URLDecode(name);
				Collection<String> names = new ArrayList<String>();
				for (String str : name.split(",")) {
					names.add(str.trim());
				}
				if (names.size() > 0)
					criteria.add(Restrictions.in("name", names));
			}
		}
		this.setPagination(this.getLiaisonService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueLiaison", results = { @Result(name = "error", type = "chain", location = "listAllLiaison") })
	public String editIssueLiaison() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		liaisons = this.getLiaisonService().getLiaisonByIds(ids);
		for (Liaison liaison : liaisons) {
			issueDocIds = (issueDocIds == null) ? liaison.getId().toString()
					: issueDocIds + "," + liaison.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueLiaison", results = {
			@Result(name = "success", type = "redirect", location = "listAllLiaison"),
			@Result(name = "error", type = "chain", location = "editIssueLiaison") })
	public String submitIssueLiaison() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueLiaisonService().submitIssueLiaison(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueLiaison")
	public String listIssueLiaison() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueLiaison.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueLiaisonService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueLiaison", results = { @Result(name = "success", type = "redirect", location = "listIssueLiaison") })
	public String removeIssueLiaison() {
		this.getIssueLiaisonService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveLiaison")
	public String listReceiveLiaison() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueLiaison.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueLiaisonService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	// //////////////////////////////////////////////////////////
	@Action("listAllFeedback")
	public String listAllFeedback() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Feedback.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getNoticeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueFeedback", results = { @Result(name = "error", type = "chain", location = "listAllFeedback") })
	public String editIssueFeedback() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		feedbacks = this.getFeedbackService().getFeedbackByIds(ids);
		for (Feedback feedback : feedbacks) {
			issueDocIds = (issueDocIds == null) ? feedback.getId().toString()
					: issueDocIds + "," + feedback.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueFeedback", results = {
			@Result(name = "success", type = "redirect", location = "listAllFeedback"),
			@Result(name = "error", type = "chain", location = "editIssueFeedback") })
	public String submitIssueFeedback() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueFeedbackService().submitIssueFeedback(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueFeedback")
	public String listIssueFeedback() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueFeedback.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueFeedbackService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueFeedback", results = { @Result(name = "success", type = "redirect", location = "listIssueFeedback") })
	public String removeIssueFeedback() {
		this.getIssueFeedbackService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveFeedback")
	public String listReceiveFeedback() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueFeedback.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueNoticeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	// /////////////////////////////////////////////////////////
	@Action("listAllResume")
	public String listAllResume() {
		return SUCCESS;
	}

	@Action("listAllResumeByDept")
	public String listAllResumeByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Resume.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (name != null) {
			if (!"all".equals(name)) {
				name = ReportUtils.URLDecode(name);
				Collection<String> names = new ArrayList<String>();
				for (String str : name.split(",")) {
					names.add(str.trim());
				}
				if (names.size() > 0)
					criteria.add(Restrictions.in("name", names));
			}
		}
		this.setPagination(this.getResumeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	// ss
	@Action(value = "editIssueResume", results = { @Result(name = "error", type = "chain", location = "listAllResume") })
	public String editIssueResume() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		resumes = this.getResumeService().getResumeByIds(ids);
		for (Resume resume : resumes) {
			issueDocIds = (issueDocIds == null) ? resume.getId().toString()
					: issueDocIds + "," + resume.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueResume", results = {
			@Result(name = "success", type = "redirect", location = "listAllResume"),
			@Result(name = "error", type = "chain", location = "editIssueResume") })
	public String submitIssueResume() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueResumeService().submitIssueResume(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueResume")
	public String listIssueResume() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueResume.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueResumeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueResume", results = { @Result(name = "success", type = "redirect", location = "listIssueResume") })
	public String removeIssueResume() {
		this.getIssueResumeService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveResume")
	public String listReceiveResume() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueResume.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueResumeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllPayroll")
	public String listAllPayroll() {
		return SUCCESS;
	}

	@Action("listAllPayrollByDept")
	public String listAllPayrollByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Payroll.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		criteria.addOrder(Order.desc("recordTime"));
		if (dept != null) {
			if (!"all".equals(dept)) {
				String t = dept;
				String ydmc = dept.split(",")[0];
				if (ToolKits.isInteger(ydmc)) {
					criteria.createAlias("recorder", "re");
					criteria.add(Restrictions.eq("re.id", Integer
							.parseInt(ydmc)));
				} else if (ydmc.indexOf("dept") != -1) {
					Collection<Integer> pes = new ArrayList<Integer>();
					for (String pe : t.split(",")) {
						if (pe.indexOf("dept") == -1) {
							pes.add(Integer.parseInt(pe));
						}
					}
					if (pes.size() > 0) {
						criteria.createAlias("recorder", "re");
						criteria.add(Restrictions.in("re.id", pes));
					}
				}
			}
		}
		this.setPagination(this.getPayrollService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssuePayroll", results = { @Result(name = "error", type = "chain", location = "listAllPayroll") })
	public String editIssuePayroll() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		payrolls = this.getPayrollService().getPayrollByIds(ids);
		for (Payroll payroll : payrolls) {
			issueDocIds = (issueDocIds == null) ? payroll.getId().toString()
					: issueDocIds + "," + payroll.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssuePayroll", results = {
			@Result(name = "success", type = "redirect", location = "listAllPayroll"),
			@Result(name = "error", type = "chain", location = "editIssuePayroll") })
	public String submitIssuePayroll() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssuePayrollService().submitIssuePayroll(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssuePayroll")
	public String listIssuePayroll() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssuePayroll.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssuePayrollService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssuePayroll", results = { @Result(name = "success", type = "redirect", location = "listIssuePayroll") })
	public String removeIssuePayroll() {
		this.getIssuePayrollService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceivePayroll")
	public String listReceivePayroll() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssuePayroll.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssuePayrollService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllApply")
	public String listAllApply() {
		return SUCCESS;
	}

	@Action("listAllSendTaskByDept")
	public String listAllSendTaskByDep() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Document.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		criteria.addOrder(Order.desc("recordTime"));
		this.setPagination(this.getDocumentService().listByPage(criteria,
				pagination));
		return SUCCESS;

	}

	@Action("listAllApplyByDept")
	public String listAllApplyByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Apply.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				String t = dept;
				String ydmc = dept.split(",")[0];
				if (ToolKits.isInteger(ydmc)) {
					criteria.createAlias("recorder", "re");
					criteria.add(Restrictions.eq("re.id", Integer
							.parseInt(ydmc)));
				} else if (ydmc.indexOf("dept") != -1) {
					Collection<Integer> pes = new ArrayList<Integer>();
					for (String pe : t.split(",")) {
						if (pe.indexOf("dept") == -1) {
							pes.add(Integer.parseInt(pe));
						}
					}
					if (pes.size() > 0) {
						criteria.createAlias("recorder", "re");
						criteria.add(Restrictions.in("re.id", pes));
					}
				}
			}
		}
		this.setPagination(this.getApplyService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueApply", results = { @Result(name = "error", type = "chain", location = "listAllApply") })
	public String editIssueApply() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}

		for (Integer id : ids) {
			System.out.println("循环出的值=" + id);
		}
		applys = this.getApplyService().getApplyByIds(ids);
		for (Apply apply : applys) {
			issueDocIds = (issueDocIds == null) ? apply.getId().toString()
					: issueDocIds + "," + apply.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueApply", results = {
			@Result(name = "success", type = "redirect", location = "listAllApply"),
			@Result(name = "error", type = "chain", location = "editIssueApply") })
	public String submitIssueApply() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueApplyService().submitIssueApply(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueApply")
	public String listIssueApply() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueApply.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueApplyService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueApply", results = { @Result(name = "success", type = "redirect", location = "listIssueApply") })
	public String removeIssueApply() {
		this.getIssueApplyService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveApply")
	public String listReceiveApply() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueApply.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueApplyService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllKnowledge")
	public String listAllKnowledge() {
		return SUCCESS;
	}

	@Action("listAllKnowledgeByReg")
	public String listAllKnowledgeByReg() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Knowledge.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				dept = dept.split(",")[0];
				if (ToolKits.isInteger(dept)) {
					criteria.createAlias("type", "ty");
					criteria.add(Restrictions.eq("ty.id", Integer
							.parseInt(dept)));
				}
			}
		}
		this.setPagination(this.getKnowledgeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueKnowledge", results = { @Result(name = "error", type = "chain", location = "listAllKnowledge") })
	public String editIssueKnowledge() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		knowledges = this.getKnowledgeService().getKnowledgeByIds(ids);
		for (Knowledge knowledge : knowledges) {
			issueDocIds = (issueDocIds == null) ? knowledge.getId().toString()
					: issueDocIds + "," + knowledge.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueKnowledge", results = {
			@Result(name = "success", type = "redirect", location = "listAllKnowledge"),
			@Result(name = "error", type = "chain", location = "editIssueKnowledge") })
	public String submitIssueKnowledge() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueKnowledgeService().submitIssueKnowledge(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueKnowledge")
	public String listIssueKnowledge() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueKnowledge.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueKnowledgeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueKnowledge", results = { @Result(name = "success", type = "redirect", location = "listIssueKnowledge") })
	public String removeIssueKnowledge() {
		this.getIssueKnowledgeService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveKnowledge")
	public String listReceiveKnowledge() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueKnowledge.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueKnowledgeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllNotice")
	public String listAllNotice() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Notice.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getNoticeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueNotice", results = { @Result(name = "error", type = "chain", location = "listAllNotice") })
	public String editIssueNotice() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		notices = this.getNoticeService().getNoticeByIds(ids);
		for (Notice notice : notices) {
			issueDocIds = (issueDocIds == null) ? notice.getId().toString()
					: issueDocIds + "," + notice.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueLNotice", results = {
			@Result(name = "success", type = "redirect", location = "listAllNotice"),
			@Result(name = "error", type = "chain", location = "editIssueNotice") })
	public String submitIssueLNotice() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueNoticeService().submitIssueNotice(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueNotice")
	public String listIssueNotice() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueNotice.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueNoticeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueNotice", results = { @Result(name = "success", type = "redirect", location = "listIssueNotice") })
	public String removeIssueNotice() {
		this.getIssueNoticeService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveNotice")
	public String listReceiveNotice() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueNotice.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueNoticeService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllWorkSummary")
	public String listAllWorkSummary() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				WorkSummary.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getWorkSummaryService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action("listAllWorkSummaryByDept")
	public String listAllWorkSummaryByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				WorkSummary.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				Collection<Integer> personIds = new ArrayList<Integer>();
				for (String val : dept.split(",")) {
					if (val.indexOf("dept") == -1) {
						if (ToolKits.isInteger(val)) {
							personIds.add(Integer.parseInt(val));
						}
					}
				}
				if (personIds.size() > 0) {
					criteria.createAlias("referPerson", "ri");
					criteria.add(Restrictions.in("ri.id", personIds));
				}
			}
		}
		this.setPagination(this.getWorkSummaryService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueWorkSummary", results = { @Result(name = "error", type = "chain", location = "listAllWorkSummary") })
	public String editIssueWorkSummary() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		workSummarys = this.getWorkSummaryService().getWorkSummaryByIds(ids);
		for (WorkSummary workSummary : workSummarys) {
			issueDocIds = (issueDocIds == null) ? workSummary.getId()
					.toString() : issueDocIds + ","
					+ workSummary.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = "success")
	@Action(value = "submitIssueWorkSummary", results = {
			@Result(name = "success", type = "redirect", location = "listAllWorkSummary"),
			@Result(name = "error", type = "chain", location = "editIssueWorkSummary") })
	public String submitIssueWorkSummary() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueWorkSummaryService().submitIssueWorkSummary(
				issueStartTime, issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueWorkSummary")
	public String listIssueWorkSummary() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueWorkSummary.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueWorkSummaryService().listByPage(
				criteria, pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueWorkSummary", results = { @Result(name = "success", type = "redirect", location = "listIssueWorkSummary") })
	public String removeIssueWorkSummary() {
		this.getIssueWorkSummaryService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveWorkSummary")
	public String listReceiveWorkSummary() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueWorkSummary.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueWorkSummaryService().listByPage(
				criteria, pagination));
		return SUCCESS;
	}

	@Action("listAllRegulation")
	public String listAllRegulation() {
		return SUCCESS;
	}

	@Action("listAllRegulationByDept")
	public String listAllRegulationByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Regulation.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				dept = dept.split(",")[0];
				if (ToolKits.isInteger(dept)) {
					criteria.createAlias("type", "ty");
					criteria.add(Restrictions.eq("ty.id", Integer
							.parseInt(dept)));
				}
			}
		}
		this.setPagination(this.getRegulationService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueRegulation", results = { @Result(name = "error", type = "chain", location = "listAllRegulation") })
	public String editIssueRegulation() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		regulations = this.getRegulationService().getRegulationByIds(ids);
		for (Regulation regulation : regulations) {
			issueDocIds = (issueDocIds == null) ? regulation.getId().toString()
					: issueDocIds + "," + regulation.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueRegulation", results = {
			@Result(name = "success", type = "redirect", location = "listAllRegulation"),
			@Result(name = "error", type = "chain", location = "editIssueRegulation") })
	public String submitIssueRegulation() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueRegulationService().submitIssueRegulation(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueRegulation")
	public String listIssueRegulation() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueRegulation.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueRegulationService().listByPage(
				criteria, pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueRegulation", results = { @Result(name = "success", type = "redirect", location = "listIssueRegulation") })
	public String removeIssueRegulation() {
		this.getIssueRegulationService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveRegulation")
	public String listReceiveRegulation() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueRegulation.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueRegulationService().listByPage(
				criteria, pagination));
		return SUCCESS;
	}

	@Action("listAllAffiche")
	public String listAllAffiche() {
		return SUCCESS;
	}

	@Action("listAllAfficheByDept")
	public String listAllAfficheByDept() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				Affiche.class);
		pagination = this.getPaginationHelper().prepare(pagination);
		if (dept != null) {
			if (!"all".equals(dept)) {
				dept = ReportUtils.URLDecode(dept.trim());
				dept = dept.split(",")[0];
				criteria.add(Restrictions.eq("type", dept.trim()));
			}
		}
		this.setPagination(this.getAfficheService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "editIssueAffiche", results = { @Result(name = "error", type = "chain", location = "listAllAffiche") })
	public String editIssueAffiche() {
		if (ids == null) {
			this.addActionError("请选择要发放的文档");
			return ERROR;
		}
		affiches = this.getAfficheService().getAfficheByIds(ids);
		for (Affiche affiche : affiches) {
			issueDocIds = (issueDocIds == null) ? affiche.getId().toString()
					: issueDocIds + "," + affiche.getId().toString();
		}
		return SUCCESS;
	}

	@Clew(results = { "success" })
	@Action(value = "submitIssueAffiche", results = {
			@Result(name = "success", type = "redirect", location = "listAllAffiche"),
			@Result(name = "error", type = "chain", location = "editIssueKnowledge") })
	public String submitIssueAffiche() {
		if (receivePersons == null || "".equals(receivePersons.trim())) {
			addActionError("不能为空");
			return ERROR;
		}
		if (issueStartTime == null) {
			addActionError("开始时间不能为空");
			return ERROR;
		}
		if (issueEndTime == null) {
			addActionError("结束时间不能为空");
			return ERROR;
		}
		this.getIssueAfficheService().submitIssueAffiche(issueStartTime,
				issueEndTime, issueDocIds, receivePersons);
		this.setPrompt("文档发放成功");
		return SUCCESS;
	}

	@Action("listIssueAffiche")
	public String listIssueAffiche() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueAffiche.class);
		criteria.addOrder(Order.desc("recordTime"));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueAfficheService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	@Action(value = "removeIssueAffiche", results = { @Result(name = "success", type = "redirect", location = "listIssueAffiche") })
	public String removeIssueAffiche() {
		this.getIssueAfficheService().batchRemove(ids);
		return SUCCESS;
	}

	@Action("listReceiveAffiche")
	public String listReceiveAffiche() {
		DetachedCriteria criteria = this.getPaginationHelper().createQuery(
				IssueAffiche.class);
		criteria.add(Restrictions.eq("receivePerson", AppContext
				.getAccountContext().currentUser()));
		criteria.add(Restrictions.le("startTime", Util.nowFullTime()));
		criteria.add(Restrictions.ge("endTime", Util.nowFullTime()));
		pagination = this.getPaginationHelper().prepare(pagination);
		this.setPagination(this.getIssueAfficheService().listByPage(criteria,
				pagination));
		return SUCCESS;
	}

	private void prepare() {
		leaves = this.getLeaveService().getAllLeave();
		resumes = this.getResumeService().getAllResume();
		payrolls = this.getPayrollService().getAllPayroll();
		applys = this.getApplyService().getAllApply();
		knowledges = this.getKnowledgeService().getAllKnowledge();
		notices = this.getNoticeService().getAllNotice();
		workSummarys = this.getWorkSummaryService().getAllWorkSummary();
		regulations = this.getRegulationService().getAllRegulation();
		affiches = this.getAfficheService().getAllAffiche();
	}

	public Collection<Liaison> getLiaisons() {
		return liaisons;
	}

	public void setLiaisons(Collection<Liaison> liaisons) {
		this.liaisons = liaisons;
	}

	public Collection<Feedback> getFeedbacks() {
		return feedbacks;
	}

	public void setFeedbacks(Collection<Feedback> feedbacks) {
		this.feedbacks = feedbacks;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Liaison getLiaison() {
		return liaison;
	}

	public void setLiaison(Liaison liaison) {
		this.liaison = liaison;
	}

	public LiaisonService getLiaisonService() {
		return liaisonService;
	}

	public void setLiaisonService(LiaisonService liaisonService) {
		this.liaisonService = liaisonService;
	}

	public Feedback getFeedback() {
		return feedback;
	}

	public void setFeedback(Feedback feedback) {
		this.feedback = feedback;
	}

	public FeedbackService getFeedbackService() {
		return feedbackService;
	}

	public void setFeedbackService(FeedbackService feedbackService) {
		this.feedbackService = feedbackService;
	}

	public IssueLiaisonService getIssueLiaisonService() {
		return issueLiaisonService;
	}

	public void setIssueLiaisonService(IssueLiaisonService issueLiaisonService) {
		this.issueLiaisonService = issueLiaisonService;
	}

	public IssueFeedbackService getIssueFeedbackService() {
		return issueFeedbackService;
	}

	public void setIssueFeedbackService(
			IssueFeedbackService issueFeedbackService) {
		this.issueFeedbackService = issueFeedbackService;
	}

	public IssueLiaison getIssueLiaison() {
		return issueLiaison;
	}

	public void setIssueLiaison(IssueLiaison issueLiaison) {
		this.issueLiaison = issueLiaison;
	}

	public IssueFeedback getIssueFeedback() {
		return issueFeedback;
	}

	public void setIssueFeedback(IssueFeedback issueFeedback) {
		this.issueFeedback = issueFeedback;
	}

	public RegulationService getRegulationService() {
		return regulationService;
	}

	public void setRegulationService(RegulationService regulationService) {
		this.regulationService = regulationService;
	}

	public AfficheService getAfficheService() {
		return afficheService;
	}

	public void setAfficheService(AfficheService afficheService) {
		this.afficheService = afficheService;
	}

	public PaginationSupport getPagination() {
		return pagination;
	}

	public void setPagination(PaginationSupport pagination) {
		this.pagination = pagination;
	}

	public LeaveService getLeaveService() {
		return leaveService;
	}

	public Date getIssueStartTime() {
		return issueStartTime;
	}

	public void setIssueStartTime(Date issueStartTime) {
		this.issueStartTime = issueStartTime;
	}

	public Date getIssueEndTime() {
		return issueEndTime;
	}

	public void setIssueEndTime(Date issueEndTime) {
		this.issueEndTime = issueEndTime;
	}

	public String getReceivePersons() {
		return receivePersons;
	}

	public void setReceivePersons(String receivePersons) {
		this.receivePersons = receivePersons;
	}

	public String getReceivePersonNames() {
		return receivePersonNames;
	}

	public void setReceivePersonNames(String receivePersonNames) {
		this.receivePersonNames = receivePersonNames;
	}

	public void setLeaveService(LeaveService leaveService) {
		this.leaveService = leaveService;
	}

	public ResumeService getResumeService() {
		return resumeService;
	}

	public void setResumeService(ResumeService resumeService) {
		this.resumeService = resumeService;
	}

	public ApplyService getApplyService() {
		return applyService;
	}

	public void setApplyService(ApplyService applyService) {
		this.applyService = applyService;
	}

	public KnowledgeService getKnowledgeService() {
		return knowledgeService;
	}

	public void setKnowledgeService(KnowledgeService knowledgeService) {
		this.knowledgeService = knowledgeService;
	}

	public NoticeService getNoticeService() {
		return noticeService;
	}

	public Leave getLeave() {
		return leave;
	}

	public void setLeave(Leave leave) {
		this.leave = leave;
	}

	public Resume getResume() {
		return resume;
	}

	public void setResume(Resume resume) {
		this.resume = resume;
	}

	public Apply getApply() {
		return apply;
	}

	public void setApply(Apply apply) {
		this.apply = apply;
	}

	public Knowledge getKnowledge() {
		return knowledge;
	}

	public void setKnowledge(Knowledge knowledge) {
		this.knowledge = knowledge;
	}

	public Notice getNotice() {
		return notice;
	}

	public void setNotice(Notice notice) {
		this.notice = notice;
	}

	public WorkSummary getWorkSummary() {
		return workSummary;
	}

	public void setWorkSummary(WorkSummary workSummary) {
		this.workSummary = workSummary;
	}

	public Regulation getRegulation() {
		return regulation;
	}

	public void setRegulation(Regulation regulation) {
		this.regulation = regulation;
	}

	public Affiche getAffiche() {
		return affiche;
	}

	public void setAffiche(Affiche affiche) {
		this.affiche = affiche;
	}

	public void setNoticeService(NoticeService noticeService) {
		this.noticeService = noticeService;
	}

	public WorkSummaryService getWorkSummaryService() {
		return workSummaryService;
	}

	public void setWorkSummaryService(WorkSummaryService workSummaryService) {
		this.workSummaryService = workSummaryService;
	}

	public Collection<Leave> getLeaves() {
		return leaves;
	}

	public void setLeaves(Collection<Leave> leaves) {
		this.leaves = leaves;
	}

	public Collection<Resume> getResumes() {
		return resumes;
	}

	public void setResumes(Collection<Resume> resumes) {
		this.resumes = resumes;
	}

	public Collection<Apply> getApplys() {
		return applys;
	}

	public void setApplys(Collection<Apply> applys) {
		this.applys = applys;
	}

	public Collection<Knowledge> getKnowledges() {
		return knowledges;
	}

	public void setKnowledges(Collection<Knowledge> knowledges) {
		this.knowledges = knowledges;
	}

	public Collection<Notice> getNotices() {
		return notices;
	}

	public void setNotices(Collection<Notice> notices) {
		this.notices = notices;
	}

	public Collection<WorkSummary> getWorkSummarys() {
		return workSummarys;
	}

	public void setWorkSummarys(Collection<WorkSummary> workSummarys) {
		this.workSummarys = workSummarys;
	}

	public Collection<Regulation> getRegulations() {
		return regulations;
	}

	public void setRegulations(Collection<Regulation> regulations) {
		this.regulations = regulations;
	}

	public Collection<Affiche> getAffiches() {
		return affiches;
	}

	public void setAffiches(Collection<Affiche> affiches) {
		this.affiches = affiches;
	}

	public void setIds(Integer[] ids) {
		this.ids = ids;
	}

	public Integer[] getIds() {
		return ids;
	}

	public void setIssueLeaveService(IssueLeaveService issueLeaveService) {
		this.issueLeaveService = issueLeaveService;
	}

	public IssueLeaveService getIssueLeaveService() {
		return issueLeaveService;
	}

	public void setIssueResumeService(IssueResumeService issueResumeService) {
		this.issueResumeService = issueResumeService;
	}

	public IssueResumeService getIssueResumeService() {
		return issueResumeService;
	}

	public Payroll getPayrollBill() {
		return payrollBill;
	}

	public void setPayrollBill(Payroll payrollBill) {
		this.payrollBill = payrollBill;
	}

	public PayrollService getPayrollService() {
		return payrollService;
	}

	public void setPayrollService(PayrollService payrollService) {
		this.payrollService = payrollService;
	}

	public void setPayrolls(Collection<Payroll> payrolls) {
		this.payrolls = payrolls;
	}

	public Collection<Payroll> getPayrolls() {
		return payrolls;
	}

	public void setIssuePayrollService(IssuePayrollService issuePayrollService) {
		this.issuePayrollService = issuePayrollService;
	}

	public IssuePayrollService getIssuePayrollService() {
		return issuePayrollService;
	}

	public void setIssueDocIds(String issueDocIds) {
		this.issueDocIds = issueDocIds;
	}

	public String getIssueDocIds() {
		return issueDocIds;
	}

	public void setIssueApplyService(IssueApplyService issueApplyService) {
		this.issueApplyService = issueApplyService;
	}

	public IssueApplyService getIssueApplyService() {
		return issueApplyService;
	}

	public void setIssueKnowledgeService(
			IssueKnowledgeService issueKnowledgeService) {
		this.issueKnowledgeService = issueKnowledgeService;
	}

	public IssueKnowledgeService getIssueKnowledgeService() {
		return issueKnowledgeService;
	}

	public void setIssueNoticeService(IssueNoticeService issueNoticeService) {
		this.issueNoticeService = issueNoticeService;
	}

	public IssueNoticeService getIssueNoticeService() {
		return issueNoticeService;
	}

	public void setIssueWorkSummaryService(
			IssueWorkSummaryService issueWorkSummaryService) {
		this.issueWorkSummaryService = issueWorkSummaryService;
	}

	public IssueWorkSummaryService getIssueWorkSummaryService() {
		return issueWorkSummaryService;
	}

	public void setIssueRegulationService(
			IssueRegulationService issueRegulationService) {
		this.issueRegulationService = issueRegulationService;
	}

	public IssueRegulationService getIssueRegulationService() {
		return issueRegulationService;
	}

	public void setIssueAfficheService(IssueAfficheService issueAfficheService) {
		this.issueAfficheService = issueAfficheService;
	}

	public IssueAfficheService getIssueAfficheService() {
		return issueAfficheService;
	}

	public IssueLeave getIssueLeave() {
		return issueLeave;
	}

	public void setIssueLeave(IssueLeave issueLeave) {
		this.issueLeave = issueLeave;
	}

	public IssueResume getIssueResume() {
		return issueResume;
	}

	public void setIssueResume(IssueResume issueResume) {
		this.issueResume = issueResume;
	}

	public IssuePayroll getIssuePayroll() {
		return issuePayroll;
	}

	public void setIssuePayroll(IssuePayroll issuePayroll) {
		this.issuePayroll = issuePayroll;
	}

	public IssueApply getIssueApply() {
		return issueApply;
	}

	public void setIssueApply(IssueApply issueApply) {
		this.issueApply = issueApply;
	}

	public IssueKnowledge getIssueKnowledge() {
		return issueKnowledge;
	}

	public void setIssueKnowledge(IssueKnowledge issueKnowledge) {
		this.issueKnowledge = issueKnowledge;
	}

	public IssueNotice getIssueNotice() {
		return issueNotice;
	}

	public void setIssueNotice(IssueNotice issueNotice) {
		this.issueNotice = issueNotice;
	}

	public IssueWorkSummary getIssueWorkSummary() {
		return issueWorkSummary;
	}

	public void setIssueWorkSummary(IssueWorkSummary issueWorkSummary) {
		this.issueWorkSummary = issueWorkSummary;
	}

	public IssueRegulation getIssueRegulation() {
		return issueRegulation;
	}

	public void setIssueRegulation(IssueRegulation issueRegulation) {
		this.issueRegulation = issueRegulation;
	}

	public IssueAffiche getIssueAffiche() {
		return issueAffiche;
	}

	public void setIssueAffiche(IssueAffiche issueAffiche) {
		this.issueAffiche = issueAffiche;
	}

	public String getDept() {
		return dept;
	}

	public void setDept(String dept) {
		this.dept = dept;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Document getDocuemnt() {
		return docuemnt;
	}

	public void setDocuemnt(Document docuemnt) {
		this.docuemnt = docuemnt;
	}

	public DocumentService getDocumentService() {
		return documentService;
	}

	public void setDocumentService(DocumentService documentService) {
		this.documentService = documentService;
	}

}
